package com.example.langchain4jhighapi.controller;

import com.example.langchain4jhighapi.service.ChatAssistant;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wwl
 * 日期  2025/9/19 17:19
 * 版本 1.0
 * 描述 :
 */
@RestController
public class HighApiController {
    @Resource
    private ChatAssistant chatAssistant;

    @GetMapping(value = "/highapi/api01")
    public String chat(@RequestParam(value = "prompt", defaultValue = "你是谁") String prompt){
        return chatAssistant.chat(prompt);
    }
}
